﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using WebSite.Model;

namespace WebSite.Data.NH.Repositories.Mappings
{
    public class ContentDetailInfoMap : ClassMap<ContentDetailInfo>
    {

        public ContentDetailInfoMap()
        {
            Table("ContentDetailInfo");
            Id(u => u.ContentId).Column("ContentId").GeneratedBy.Foreign("ContentInfo");
            HasOne<ContentInfo>(d => d.ContentInfo).Cascade.All().Constrained();

            Map(x => x.Content).Column("Content");
        }
    }
}
